import"../common/modulepreload-polyfill-3cfb730f.js";import t from"https://unpkg.com/jsencrypt@3.3.1/lib/index.js";import{c as n}from"../common/page-53f648eb.js";const r=`-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCn09cm5p/oqBBseefqyxNBp6Bm
weY79jspUGQxjJoGobPxCMQg05VHby37JzpKZXAIpEDOSpFGwP0nPkeePYpGZdp/
EBfY8BfMErpGoRUyqXISTWo6bqr6mF1mqh+/WxFk011Fm51g5kYEGW7bu9PT5zWj
Q0+KbcAX1d/2MFEXLwIDAQAB
-----END PUBLIC KEY-----`,s=`-----BEGIN PRIVATE KEY-----
MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAKfT1ybmn+ioEGx5
5+rLE0GnoGbB5jv2OylQZDGMmgahs/EIxCDTlUdvLfsnOkplcAikQM5KkUbA/Sc+
R549ikZl2n8QF9jwF8wSukahFTKpchJNajpuqvqYXWaqH79bEWTTXUWbnWDmRgQZ
btu709PnNaNDT4ptwBfV3/YwURcvAgMBAAECgYEAnQQKQF/27hIHQ6YOP9J9EqkE
3f69LA5kLXQEOYNlO50gH/tmm5u5B1tSdq6tz5r15W/fHeIP51V5w7R2ButmqJBW
POinVJxm5w1648Ii0ts0fMBWBU/ynZDGzVP1kSJ3EzyJ3yAZkz68qybcfqliOWMo
Feuxq/P41dSGO8aqA9ECQQDXEncLd0osLWHsmyb8idMuQTGyCrcgP7MvN0ZrTaxZ
p2YeVYL/O7CIqbbvpiI1PDuKgnBzRcz34k2s2H4Err3pAkEAx8PJ0BPdvVVfPNSc
2O2AdwGH/nnFn+1GTXyo795mH973rpValSn7hGtF4Sib+Xa+9syNzYfNXGUEAF8G
hNEFVwJAFxSDM/bMPets29BWoblEsW0LoTinKE3Ns95xryg5u7FMMysoEK3eJvxX
hmZEu4PIO/f9i1FNSri9bzQYafY6qQJBAJ4npim08MMrSgFxGtSsBB8z+SVB53Kc
eiJy5ZUy8IufDV0NJfAekuDdxS9j5Uj1+G6QuFvWfoH9/9MDaLfSfHUCQQCXEhfF
71nUG+Pkg+c07uOCbS79o/jucmoDAP6X0PfSFmgdK5Muf0Ja/ylePibkM7oVvlwv
SY84fQj2PWCEQP2F
-----END PRIVATE KEY-----`;new Vue({el:"#app",data(){return{activeName:"encrypt",publicKey:r,privateKey:s,content:"",encrypted:""}},methods:{encryptHandle(){if(!this.content)return this.$message.error("请输入原文");const e=new t;e.setPublicKey(this.publicKey),this.encrypted=e.encrypt(this.content)},decryptHandle(){if(!this.encrypted)return this.$message.error("请输入密文");const e=new t;if(e.setPrivateKey(this.privateKey),this.content=e.decrypt(this.encrypted),!this.content)return this.$message.error("解密失败")},copyResult(e){if(!e)return this.$message.error("结果为空");n(e),this.$message.success("复制成功")},handleTabClick(){this.content="",this.encrypted=""}}});
